package com.kfm.pm.nest;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

public class ProvinceTest {

    public static void main(String[] args) {
        // 以省份作为key String  所有的城市作为value List<String>
        HashMap<String, List<String>> provinceMap = new HashMap<>();
        provinceMap.put("陕西省", List.of("咸阳", "西安", "宝鸡", "榆林"));
        // 集合 转为 数组 toArray()  数组转集合List  Arrays.asList()
        provinceMap.put("甘肃省", Arrays.asList(new String[]{"兰州", "平凉", "庆阳", "酒泉", "天水"}));
        provinceMap.put("浙江省", List.of("温州", "杭州", "宁波", "绍兴"));
        System.out.println(provinceMap.get("陕西省"));
        System.out.println(provinceMap.get("甘肃省"));
    }
}
